<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVillagePubOperateLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('village_pub_operate_logs', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('乡村在线操作记录表');
            $table->bigInteger('village_pub_id') ->nullable(false) ->comment('乡村在线id');
            $table->tinyInteger('operate_type') ->nullable(false) ->comment('操作类型（1:阅读；2:点赞；3喜欢；4收藏；5分享；6关注作者）');
            $table->integer('user_id') ->nullable() ->comment('用户id');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('village_pub_operate_logs', function (Blueprint $table) {
            //
        });
    }
}
